//
//  InviteResultInfo.m
//  HWZB
//
//  Created by 许成雄 on 2017/5/2.
//  Copyright © 2017年 wonders. All rights reserved.
//

#import "InviteResultInfo.h"

@implementation InviteResultInfo

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
    return @{
             @"invitedId" : @"id",
             @"loginId" : @"loginid",
             @"lowerLevelId" : @"lowerLevel",
             @"oneLevel" : @"oneLevel",
             @"twoLevel" : @"teoLevel"
             };
}

+ (NSValueTransformer *)inviteIdJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)loginIdJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)lowerLevelJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)oneLevelJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

+ (NSValueTransformer *)twoLevelJSONTransformer {
    return [MTLValueTransformer transformerWithBlock:^id(id value) {
        if([value isKindOfClass:[NSNumber class]]) {
            return [value stringValue];
        } else {
            return (NSString *)value;
        }
    }];
}

@end
